package com.tanggh.service.impl;

import java.util.Date;

import com.tanggh.dao.PersonDao;
import com.tanggh.domain.Person;
import com.tanggh.service.LogService;
import com.tanggh.service.PersonService;

public class PersonServiceImpl implements PersonService {
	
	private PersonDao personDao;
	private LogService logService;
	
	public void setLogService(LogService logService) {
		this.logService = logService;
	}
	
	public void setPersonDao(PersonDao personDao) {
		this.personDao = personDao;
	}
	
	@Override
	public void addPerson(Person person) {
		
		personDao.addPerson(person);
		// 记录日志
		logService.addLog(new Date() + "添加了条记录:" + person);
	}

}
